unit uVerificaPermissao;

interface

type
  TVerificaPermissao = class

  function buscarPermissaoAcesso(idpermissao,idpermissaoModulo : Integer) : boolean;
  function buscarPermissaoEdicao(idpermissao,idpermissaoModulo : Integer) : boolean;
  function buscarPermissaoExclusao(idpermissao,idpermissaoModulo : Integer) : boolean;
  function buscarPermissaoInclusao(idpermissao,idpermissaoModulo : Integer) : boolean;



  private
    Fteste: string;
    { Private declarations }
  public
    { Public declarations }



  end;




implementation

{ TVerificaPermissao }

uses DMDadosUnt;

function TVerificaPermissao.buscarPermissaoAcesso(idpermissao,idpermissaoModulo: Integer): boolean;
begin
  DMDados.cdsBuscaPermissao.Close;
  DMDados.cdsBuscaPermissao.Params[0].AsInteger := idpermissao;
  DMDados.cdsBuscaPermissao.Params[1].AsInteger := idpermissaoModulo;
  DMDados.cdsBuscaPermissao.Open;


  if DMDados.cdsBuscaPermissaoACESSO.AsString = 'S' then
  begin
    result := true;
  end
  else
  begin
    Result := false;
  end;

end;

function TVerificaPermissao.buscarPermissaoEdicao(idpermissao,
  idpermissaoModulo: Integer): boolean;
begin

end;

function TVerificaPermissao.buscarPermissaoExclusao(idpermissao,
  idpermissaoModulo: Integer): boolean;
begin

end;

function TVerificaPermissao.buscarPermissaoInclusao(idpermissao,
  idpermissaoModulo: Integer): boolean;
begin

end;

end.
